<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>UploadiFive Test</title>
<script src="jquery-1.7.min.js" type="text/javascript"></script>
<script src="jquery.uploadify.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="uploadify.css">
<style type="text/css">
body {
	font: 13px Arial, Helvetica, Sans-serif;
}
.aa{ width:120px; height:120px; border:1px solid #eaeaea; border-radius:5px; position:relative; }
.btn{ border:none; background:#eaeaea; border-radius:5px; color:#f50; border:0px solid #666666; text-shadow:none; font-size:0; margin:0; padding:0; color:#f50; }
.add{ width:50px; height:50px; border:1px solid #333333; border-radius:50%; font-size:32px; fonft-weight:bold; color:#000000; text-align:center; line-height:50px; cursor:pointer; margin:20px auto;}
.add:hover{ color:#f50; border:1px solid #f50;}
</style>
</head>

<body>
	<h1>Uploadify Demo</h1>


       <input id="file_upload" name="file_upload" type="file" multiple="true">
      <div class="aa" id="aa">
      </div>
	<script type="text/javascript">
		<?php $timestamp = time();?>
		$(function() {
			$('#file_upload').uploadify({
				'formData'     : {
					'timestamp' : '<?php echo $timestamp;?>',
					'token'     : '<?php echo md5('unique_salt' . $timestamp);?>'
				},
				'queueID':"aa",
				'buttonClass':"btn" ,
				'buttonText':"上传头像" ,
				'width':"70" ,
				'height':"30" ,
				'swf'      : 'uploadify.swf',
				'uploader' : 'uploadify.php',
				'removeCompleted':false,

				'onUploadSuccess':function(file){
                      $(".uploadify-queue-item").remove();
                      $(".aa").append('<img src="uploads/'+file.name+'" width="120" height="120"/>');
				}
			});
		});
	</script>
</body>
</html>